package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.core.domain.BaseVo;

import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 省市县区
 * </p>
 * @author WuZH
 * @since 2024-05-17
 */
@Getter
@Setter
@TableName ("erp_area_info")
@ApiModel (value = "AreaEntity对象", description = "省市县区")
public class AreaEntity extends BaseVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty ("省市县区ID")
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    @ApiModelProperty ("省市区县名称")
    @TableField ("area_name")
    private String areaName;

    @ApiModelProperty ("省市区县拼音")
    @TableField ("area_pinyin")
    private String areaPinyin;

    @ApiModelProperty ("行政区域代码")
    @TableField ("area_code")
    private String areaCode;

    @ApiModelProperty ("1、省份，2城市，3区县")
    @TableField ("level")
    private Integer level;

    @ApiModelProperty ("父ID")
    @TableField ("parent_id")
    private String parentId;

    @TableField ("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField ("change_time")
    private Date changeTime;

    @TableField ("is_used")
    private Integer isUsed;

    @TableField(exist = false)
    private String parentAreaName;

}
